home *** CD-ROM | disk | FTP | other *** search
/ Mac Power 1997 December / MACPOWER-1997-12.ISO.7z / MACPOWER-1997-12.ISO / AMUG / PROGRAMMING / Raven 1.2 Examples.sit / Raven 1.2 Examples / BoxPaint / Source / Pane.h < prev    next >
Text File  |  1997-03-09  |  2KB  |  98 lines

  1. /*
  2.  *  File:       Pane.h
  3.  *  Summary:       A pane displaying the 3D object and a 3D cursor.
  4.  *  Written by: Jesse Jones
  5.  *
  6.  *  Copyright ゥ 1997 Jesse Jones. 
  7.  *    For conditions of distribution and use, see copyright notice in ZTypes.h  
  8.  *
  9.  *  Change History (most recent first):    
  10.  *
  11.  *         <->     2/07/97    JDJ        Created
  12.  */
  13.  
  14. #pragma once
  15.  
  16. #include <QD3D.h>
  17.  
  18. #include <Z3DView.h>
  19. #include <ZCommander.h>
  20. #include <ZPane.h>
  21.  
  22. #include "Pencil.h"
  23.  
  24.  
  25. //-----------------------------------
  26. //    Forward References
  27. //
  28. class CDocument;
  29. class T3DPick;
  30.  
  31.  
  32. // ===================================================================================
  33. //    class CPane
  34. // ===================================================================================
  35. class CPane : public TPane, public MCommander {
  36.  
  37.     typedef TPane Inherited;
  38.  
  39. //-----------------------------------
  40. //    Initialization/Destruction
  41. //
  42. public:    
  43.     virtual             ~CPane();
  44.     
  45.                         CPane(TView* superView);
  46.     
  47. //-----------------------------------
  48. //    New API
  49. //
  50. public:
  51.     virtual ulong         HandlePick(T3DPick* pickObject);
  52.                         // Returns the number of hits.
  53.                         
  54.             CPencil&     GetCursor()                                {return mCursor;}
  55.             
  56.             T3DView&     GetView()                                {return mView;}
  57.  
  58.             CDocument*     GetDoc()                                {return mDoc;}
  59.  
  60. //-----------------------------------
  61. //    Inherited API
  62. //
  63. public:
  64.     static     MReanimatable* Create(MReanimatable* parent);
  65.  
  66. protected:
  67.     virtual void         OnReanimated();
  68.     
  69.     virtual void         OnDraw(TCanvas& canvas, const TRegion& dirtyRgn);
  70.     
  71.     virtual bool         OnMouseDown(const TMouseEvent& event);
  72.  
  73.     virtual bool         OnAdjustCursor(const TEvent& event);
  74.  
  75.     virtual bool         OnKeyDown(const TKeyEvent& event);
  76.  
  77.     virtual bool         OnMenuCommand(const MenuCommand& command);
  78.         
  79.     virtual bool         OnCommandStatus(const MenuCommand& command, SCommandStatus& status);
  80.     
  81. //-----------------------------------
  82. //    Internal API
  83. //
  84. protected:
  85.     virtual void         CreateView();
  86.     
  87.     virtual void         SubmitScene();
  88.     
  89. //-----------------------------------
  90. //    Member data
  91. //
  92. protected:
  93.     CDocument*        mDoc;
  94.  
  95.     T3DView            mView;                    // the view for the scene
  96.     CPencil            mCursor;                // The Cursor in Mindblowing 3D!
  97. };
  98.